package com.ruoyi.partner.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.partner.mapper.CmsPartnerMapper;
import com.ruoyi.partner.domain.CmsPartner;
import com.ruoyi.partner.service.ICmsPartnerService;

/**
 * 合作伙伴Service业务层处理
 * 
 * @author hct
 * @date 2022-02-16
 */
@Service
public class CmsPartnerServiceImpl implements ICmsPartnerService 
{
    @Autowired
    private CmsPartnerMapper cmsPartnerMapper;

    /**
     * 查询合作伙伴
     * 
     * @param id 合作伙伴主键
     * @return 合作伙伴
     */
    @Override
    public CmsPartner selectCmsPartnerById(Long id)
    {
        return cmsPartnerMapper.selectCmsPartnerById(id);
    }

    /**
     * 查询合作伙伴列表
     * 
     * @param cmsPartner 合作伙伴
     * @return 合作伙伴
     */
    @Override
    public List<CmsPartner> selectCmsPartnerList(CmsPartner cmsPartner)
    {
        return cmsPartnerMapper.selectCmsPartnerList(cmsPartner);
    }

    /**
     * 新增合作伙伴
     * 
     * @param cmsPartner 合作伙伴
     * @return 结果
     */
    @Override
    public int insertCmsPartner(CmsPartner cmsPartner)
    {
        return cmsPartnerMapper.insertCmsPartner(cmsPartner);
    }

    /**
     * 修改合作伙伴
     * 
     * @param cmsPartner 合作伙伴
     * @return 结果
     */
    @Override
    public int updateCmsPartner(CmsPartner cmsPartner)
    {
        return cmsPartnerMapper.updateCmsPartner(cmsPartner);
    }

    /**
     * 批量删除合作伙伴
     * 
     * @param ids 需要删除的合作伙伴主键
     * @return 结果
     */
    @Override
    public int deleteCmsPartnerByIds(Long[] ids)
    {
        return cmsPartnerMapper.deleteCmsPartnerByIds(ids);
    }

    /**
     * 删除合作伙伴信息
     * 
     * @param id 合作伙伴主键
     * @return 结果
     */
    @Override
    public int deleteCmsPartnerById(Long id)
    {
        return cmsPartnerMapper.deleteCmsPartnerById(id);
    }
}
